package com.javaxiaobear.module.monitor.controller;

import com.javaxiaobear.base.framework.web.domain.AjaxResult;
import com.javaxiaobear.base.framework.web.domain.Server;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务器监控
 *
 * @author javaxiaobear
 */
@RestController
@RequestMapping("/monitor/server")
public class ServerController {
  @SaCheckPermission("monitor:server:list")
  @GetMapping()
  public AjaxResult getInfo() throws Exception {
    Server server = new Server();
    server.copyTo();
    return AjaxResult.success(server);
  }
}
